//
//  CateTopCollectionViewCell.m
//  DanTang
//
//  Created by honeyrr on 2017/9/28.
//  Copyright © 2017年 honeyrr. All rights reserved.
//

#import "CateTopCollectionViewCell.h"

@interface CateTopCollectionViewCell()

@property (weak, nonatomic) IBOutlet UIButton *placeholdBtn;
@property (weak, nonatomic) IBOutlet UIImageView *cateTopImg;

@end

@implementation CateTopCollectionViewCell

-(void)setCollection:(NSDictionary *)collection
{
    _collection = collection;
    [self.cateTopImg sd_setImageWithURL:[NSURL URLWithString:collection[@"banner_image_url"]] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.placeholdBtn.hidden = YES;
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.cateTopImg.layer.cornerRadius = 10;
    self.cateTopImg.layer.masksToBounds = YES;
}

@end
